home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 051-075 / scopedisk69 / cclat / src / list.h < prev    next >
C/C++ Source or Header  |  1995-03-19  |  533b  |  23 lines

  1. /*
  2.  * expandable lists
  3.  * March 1989, Miles Bader
  4.  */
  5.  
  6. extern char insertMark;
  7.  
  8. struct list {
  9.     int num,max;
  10.     int insertionPoint;                        /* where a new element gets added */
  11.     void **els;
  12.     void (*freeProc)();                        /* if non-NULL, used to free elements */
  13. };
  14.  
  15. struct list *list_Create(void **initEls);
  16. void list_Free(struct list *l);
  17. void list_Add(struct list *l,void *el);
  18.  
  19. #define list_GetEls(l) ((l)->els)
  20. #define list_GetLen(l) ((l)->num)
  21.  
  22. #define list_SetFree(l,fp) ((l)->freeProc=fp)
  23.